package com.gp.gback.system.constants;

import java.math.BigDecimal;

/**
 * Created by kongryan on 16/10/21.
 */
public interface TrendyConstants {

    public final static String WAREHOUSE_CODE_PREFIX = "DC";

    public final static BigDecimal discountRateForZeroRetailPrice = BigDecimal.ZERO;

    static enum TrendyStoreBrand {

        TS("TS","Superdry"),
        TC("TC","Coven Garden"),
        T0("T0","Trendy"),
        T1("T1","ochirly"),
        T2("T2","Five Plus"),
        T3("T3","Trendiano"),
        T5("T5","Love Ysabel"),
        T6("T6","MIS"),
        T7("T7","ENE"),
        WZ("UNKNOWN","未知"),
        ;
        // 成员变量
        private final String brandCode;
        private final String brandName;

        public static TrendyStoreBrand getByCode(String code){
            for (TrendyStoreBrand brand: TrendyStoreBrand.values()){
                if (brand.getBrandCode().equals(code)){
                    return brand;
                }
            }
            return WZ;
        }

        // 构造方法
        private TrendyStoreBrand(String brandCode, String brandName) {
            this.brandCode = brandCode;
            this.brandName = brandName;
        }


        public String getBrandCode() {
            return brandCode;
        }

        public String getBrandName() {
            return brandName;
        }
    }



    static enum TrendyProductBrand {

        Superdry("S","Superdry"),
        Ochirly("1","Ochirly"),
        FivePlus("2","FivePlus"),
        Trendiano("3","Trendiano"),
        LoveYsabel("5","LoveYsabel"),
        MissSixty("6","MissSixty"),
        Energie("7","Energie"),
        Killah("8","Killah"),
        CovenGarden("C","CovenGarden"),
        MN("AbstractProductAnalyzer","M&N"),
        RE("R","RE"),
        Waxy("X","Waxy"),
        WZ("UNKNOWN","未知"),
        ;
        // 成员变量
        private final String brandCode;
        private final String brandName;

        public static TrendyProductBrand getByCode(String code){
            for (TrendyProductBrand brand: TrendyProductBrand.values()){
                if (brand.getBrandCode().equals(code)){
                    return brand;
                }
            }
            return WZ;
        }

        // 构造方法
        private TrendyProductBrand(String brandCode, String brandName) {
            this.brandCode = brandCode;
            this.brandName = brandName;
        }


        public String getBrandCode() {
            return brandCode;
        }

        public String getBrandName() {
            return brandName;
        }
    }

    static interface FPosCustomserLevel {
        /**
         * 普通客户
         */
        public static final String NORMAL = "1";
        /**
         * 注册会员
         */
        public static final String REGISTED = "2";
        /**
         * VIP会员
         */
        public static final String VIP = "3";
    }

    static enum TrendyRegion {

        NF("000001","北方地区"),
        SF("000002","南方地区"),
        B2B("B001","B2B销售区"),
        SNF("CENTRE","偏南北方岛屿"),
        BJ("J001","北京"),
        TJ("J002","天津"),
        NH("J003","华北其他"),
        QD("J004","青岛"),
        JN("J005","济南"),
        DB("J006","东北其他"),
        SY("J007","沈阳"),
        HEB("J008","哈尔滨"),
        GZ("N001","广州"),
        SZ("N002","深圳"),
        GDE("N003","广东其它"),
        BLK("N004","black"),
        GX("N005","广西"),
        BBD("NORTH ","偏北北方岛屿"),
        SH("S001","上海"),
        HZ("S002","杭州"),
        WH("S003","武汉"),
        NJ("S004","南京"),
        HD("S005","华东其他"),
        ND("SOUTH ","南方岛屿"),
        XB("W001","西部地区"),
        NDL("W002","大陆以外地区"),
        WZ("UNKNOWN","未知"),
        ;
        // 成员变量
        private final String regionCode;
        private final String regionName;

        public static TrendyRegion getByCode(String code){
            for (TrendyRegion region: TrendyRegion.values()){
                if (region.getRegionCode().equals(code)){
                    return region;
                }
            }
            return WZ;
        }

        // 构造方法
        private TrendyRegion(String regionCode,String regionName) {
            this.regionCode = regionCode;
            this.regionName = regionName;
        }


        public String getRegionCode() {
            return regionCode;
        }

        public String getRegionName() {
            return regionName;
        }
    }


    static enum TrendyCompany {

        GZ("2101","广州赫基服饰有限公司"),
        SH("2102","上海赫基服饰贸易有限公司"),
        BJ("2103","北京尚岑服饰有限公司"),
        WZ("UNKNOWN","未知"),
        ;
        // 成员变量
        private final String companyCode;
        private final String companyName;

        public static TrendyCompany getByCode(String code){
            for (TrendyCompany company: TrendyCompany.values()){
                if (company.getCompanyCode().equals(code)){
                    return company;
                }
            }
            return WZ;
        }

        // 构造方法
        private TrendyCompany(String companyCode,String companyName) {
            this.companyCode = companyCode;
            this.companyName = companyName;
        }


        public String getCompanyCode() {
            return companyCode;
        }

        public String getCompanyName() {
            return companyName;
        }
    }
}
